package com.naiking.base
{
	import flash.geom.Point;

	/**
	 * 线段属性
	 * @author Naiking
	 * 
	 */	
	public class NLine
	{
		protected var _startP:Point;
		protected var _endP:Point;
		protected var _aX:int=1;//参数 正向负向
		protected var _aY:int=1;//参数 正向负向
		public function NLine(p0:Point,p1:Point)
		{
			_startP=p0;
			_endP=p1;
			if(p1.x<p0.x)
			{
				_aX=-1;
			}
			if(p1.y<p0.y)
			{
				_aY=-1;
			}
		}
		public function get aX():int
		{
			return _aX;
		}
		public function get aY():int
		{
			return _aY;
		}
		public function get distance():Number
		{
			return Point.distance(_startP,_endP);
		}
		
	}
}